package com.fzk.blog.settings.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fzk.blog.bean.Blog;
import com.fzk.blog.bean.vo.BlogInfo;

import java.util.List;
import java.util.Map;

/**
 * @author fzk
 * @date 2021-08-21 10:45
 */
public interface IBlogService {
    void insertBlog(Blog blog, String[] tag, int loginId);

    List<BlogInfo> getBlogInfoList(String title, String username, Integer typeId, List<Integer> tag, Boolean published,Integer flag);

    BlogInfo getBlogInfoById(int id,boolean published) throws JsonProcessingException;

    void updateBlog(Blog blog, String[] tag, int loginId);

    String deleteBlog(int id, int loginId);

    String getBlogContent(int id);

    Map<String, Object> getBlogInfoPage(String title, Integer typeId, Integer userId,Integer[] tag, Boolean published,Integer flag, int index, int pageSize);

    int increaseViewTimes(int blogId);

    void recycleBlog(int id, int loginId);

    Map<String, Object> getNewBlogInfoList();
}
